<?php

/*
 * 老师讲课需要修改的数据
 * 大致包括营业数据 服务人数 服务人次 员工收入 体验卡活动数据 秒杀活动数据
 * 下面记录需要修改的控制器
 */

/*
 * 1.首页营业数据
 * 控制器PublicController/index
 * 大概112行
 */
if ($store_id == 85688) {
    $staffRow['monthIncome'] = bcadd($staffRow['monthIncome'],50000,2); //当月收入
    $staffRow['todayIncome'] = bcadd($staffRow['todayIncome'], 198,2); //今日收入
}
/*
 * 2.营业数据
 * 控制器IncomeController/myData
 * 大概132行
 */
if ($store_id == 85688 && $type == 2) {
    $income['income'] = bcadd($income['income'],1980,2);
    $income['wxapp_income'] = bcadd($income['wxapp_income'],380,2);
    $vip_income = bcadd($vip_income,538,2);
    $recharge = $recharge;
    $percentArray['percent'] = $percentArray['percent'] + 0;
    $percentArray['cplCount'] = $percentArray['cplCount'] + 18;
    $percentArray['count'] = $percentArray['count'] + 18;
    $peopleArray['peopleCount'] = $peopleArray['peopleCount'] + 15;
    $peopleArray['peopleTimes'] = $peopleArray['peopleTimes'] + 18;
    $getOldCustom = $getOldCustom + 9;
}
if ($store_id == 85688 && $type == 3) {
    $income['income'] = bcadd($income['income'],6000,2);
    $income['wxapp_income'] = bcadd($income['wxapp_income'],4000,2);
    $vip_income = bcadd($vip_income,3030,2);
    $recharge = bcadd($recharge,3000,2);
    $percentArray['percent'] = $percentArray['percent'] + 0;
    $percentArray['cplCount'] = $percentArray['cplCount'] + 91;
    $percentArray['count'] = $percentArray['count'] + 91;
    $peopleArray['peopleCount'] = $peopleArray['peopleCount'] + 82;
    $peopleArray['peopleTimes'] = $peopleArray['peopleTimes'] + 91;
    $getOldCustom = $getOldCustom + 25;
}

/*
 * 3.我的-累计收入
 * 控制器UcenterController/index
 * 大概168行
 */
if ($store_id == 85688) {
    $data['money'] = $data['money'] * 10;
    $data['allMoney'] = $data['allMoney'] * 10;
}

/*
 * 4.员工列表和详情
 * 控制器StaffController/staffList、staffCnt
 * 大概134、329行
 */
if ($store_id == 85688) {
    $list[$key]['allIncome'] = round($allIncome * 140,2);
}
/* * **************************************************** */
if ($store_id == 85688) {
    $row['allIncome'] = round($row['allIncome'] * 140,2);
    $row['serviceCustom'] = Staff::getServiceCustomCount($id, 2) + 21;
    //已服务人次
    $row['serviceCount'] = Staff::getServiceCount($id, 2) + 38;
}

/*
 * 5.秒杀数据
 * 控制器MiaoshaController/miaoshaCnt、miaoshaCtmInfo
 * 大概365、375行 625行           150行 690行
 */
//if ($miaosha_id == 46892) {
//    $row['day_money'] = $dayData['money'] + 100;
//    $row['day_count'] = $dayData['count'] + 5;
//    $row['day_new'] = Miaosha::getNew($miaosha_id, 1) + 5;
//    $row['day_back'] = Miaosha::getBack($miaosha_id, 1) + 2;
//}
//
//if ($miaosha_id == 46892) {
//    $row['all_money'] = $allData['money'] + 200;
//    $row['all_count'] = $allData['count'] + 15;
//    $row['all_new'] = Miaosha::getNew($miaosha_id, 4, $start_time, $end_time) + 15;
//    $row['all_back'] = Miaosha::getBack($miaosha_id, 4, $start_time, $end_time) + 6;
//}
///* * *******************************************************************/
//if ($miaosha_id == 46892) {
//    $ctmidss = [266436, 247816, 264037, 257673, 265645];
//    $ctmids = array_merge($ctmids,$ctmidss);
//}

if ($v['id'] == 46859) {
    $list[$k]['visit_count'] = $v['visit_count'] + 86;
    $list[$k]['sell_money'] = $sell_money + 544;
}

if ($miaosha_id == 46859) {
    $row['pay_count'] = $pay_count + 8;
    $row['sell_money'] = $sell_money + 544;
    $row['visit_count'] = $row['visit_count'] + 86;
    $row['share_count'] = $row['share_count'] + 58;
}

/*
 * 6.体验卡数据
 * 控制器ExpercardController/ingExpercardData、ExpercardCtmInfo
 * 大概426、437行 775行
 */
if ($expercard_id == 19405) {
    $row['day_money'] = $dayData['money'] + 395;
    $row['day_count'] = $dayData['count'] + 2;
    $row['day_new'] = Expercard::getNewCustomNumber($store_id, $expercard_id, 1) + 2;
    $row['day_old'] = Expercard::getOldCustomNumber($store_id, $expercard_id, 1) + 0;
}

if ($expercard_id == 19405) {
    $row['all_money'] = $allData['money'];
    $row['all_count'] = $allData['count'];
    $row['all_new'] = Expercard::getNewCustomNumber($store_id, $expercard_id, 2) + 15;
    $row['all_old'] = Expercard::getOldCustomNumber($store_id, $expercard_id, 2) + 6;
}
/* * *************************************************************************** */
if ($expercard_id == 19405) {
    $ctmidss = [266436, 247816, 264037, 257673, 265645];
    $ctmids = array_merge($ctmids, $ctmidss);
}

/*
 * 7.优享
 * 控制器UshareController
 * 大概107、1187行 1329行
 */

//2739
if ($list[$i]['id'] == 3323) {
    $list[$i]['visit_count'] = $list[$i]['visit_count'] + 21;
    $list[$i]['sell_count'] = $list[$i]['sell_count'] + 21;
}

if ($row['id'] == 3323) {
    $row['visit_count'] = $row['visit_count'] + 21;
    $row['sell_count'] = $row['sell_count'] + 21;
    $row['today_paymoney'] = $pay_money + 58;
    $row['today_success_order'] = $row['today_success_order'] + 1;
    $row['today_share_count'] = $row['today_share_count'] + 289;
    $row['help_count'] = $row['help_count'] + 3;
}

if ($ushare_id == 3323 && $type == 1) {
    $row['paymoney'] = $pay_money + 58;
    $row['success_order'] = $row['success_order'] + 1;
    $row['error_order'] = $row['error_order'] + 0;
    $row['share_count'] = $row['share_count'] + 289;
    $row['visit_count'] = $row['visit_count'] + 20;
    $row['help_count'] = $row['help_count'] + 3;
}

if ($ushare_id == 3323 && $type == 2) {
    $row['paymoney'] = $pay_money + 1208;
    $row['success_order'] = $row['success_order'] + 21;
    $row['error_order'] = $row['error_order'] + 0;
    $row['share_count'] = $row['share_count'] + 489;
    $row['visit_count'] = $row['visit_count'] + 560;
    $row['help_count'] = $row['help_count'] + 56;
}

/*
 * 8.代金券
 * 控制器CouponController
 * 大概99行
 */
if ($store_id == 85688) {
    $list[$key]['last_number'] = $value['last_number'] - 6;
    $list[$key]['send_number'] = $value['send_number'] + 6;
    $list[$key]['percent'] = 100;
}
